﻿namespace EFS.DB
{
	public static class DataRow
	{
		/// Char
		public static System.Char? Char(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Char?;
		}

		/// String
		public static System.String String(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.String;
		}

		/// Boolean
		public static System.Boolean? Boolean(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Boolean?;
		}

		/// Int16
		public static System.Int16? Int16(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Int16?;
		}

		/// Int32
		public static System.Int32? Int32(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Int32?;
		}

		/// Int64
		public static System.Int64? Int64(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Int64?;
		}

		/// Single
		public static System.Single? Single(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Single?;
		}

		/// Double
		public static System.Double? Double(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Double?;
		}

		/// Decimal
		public static System.Decimal? Decimal(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Decimal?;
		}

		/// DateTime
		public static System.DateTime? DateTime(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.DateTime?;
		}

		/// DateTime
		public static System.Guid? Guid(System.Data.DataRow row, System.String columnName)
		{
			return row[columnName] as System.Guid?;
		}
	}

}